<?php

namespace app\base\model;



use think\Request;
use app\base\model\Base;
class AdminLogs extends Base
{
    protected $resultSetType = 'collection';

    protected function initialize(){
        //需要调用model的intitalize方法
        parent::initialize();
        //TODO:自定义的初始化
    }


    public function insert_logs($data){
            $ip = Request::instance()->ip();
                $tdata = [
                    "action_ip"=>$ip,
                    "action_man"=>isset($data['admin_user_id'])?$data['admin_user_id']:0,
                    "content"=>isset($data['content'])?$data['content']:"",
                    "name"=>isset($data['name'])?$data['name']:"",
                ];
       return  self::save($tdata);
    }

}